package kr.pe.johnkim.chattingday.mobile.rest.service;

import kr.pe.johnkim.chattingday.mobile.domain.ChattingDayPrivate;
import kr.pe.johnkim.chattingday.mobile.rest.dao.ChattingDayPrivateDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Chatting Day 쪽지 관계 테이블 관련 Service 메소드들을 구현하는 클래스 이다.
 * 
 * @author : johnkim <cale9797@gmail.com / Bettersoft Inc,.>
 * @Date : 12. 6. 12
 */
public class ChattingDayPrivateServiceImpl implements ChattingDayPrivateService {

    // SLF4J Logging
    private Logger logger = LoggerFactory.getLogger(ChattingDayPrivateServiceImpl.class);

    @Autowired
    private ChattingDayPrivateDao chattingDayPrivateDao = null;

    /**
     * 쪽지 관계 테이블에 등록 한다.
     *
     * @param chattingDayPrivate
     * @return
     */
    @Override
    public boolean registerPrivate(ChattingDayPrivate chattingDayPrivate) {
        logger.info("registerPrivate");

        return chattingDayPrivateDao.registerPrivate(chattingDayPrivate);
    }

    /**
     * 쪽지 관계를 비활성화 한다.
     *
     * @param chattingDayPrivate
     * @return
     */
    @Override
    public boolean updateDeactivatePrivate(ChattingDayPrivate chattingDayPrivate) {
        logger.info("updateDeactivatePrivate");

        return chattingDayPrivateDao.updateDeactivatePrivate(chattingDayPrivate);
    }
}
